import mongoose from 'mongoose';

const AdvisementSchema = new mongoose.Schema(
  {
    priority: Number, // 展示的优先级
    show: Boolean, // 是否展示
    url: String, // 跳转链接
    url_params: Object, // 跳转链接参数
    img_url: String, // 图片地址
    des: String, // 描述
    tags: [String],
    create_time: Date // 创建时间
  },
  { versionKey: false }
);

const Advisement = mongoose.model('Advisement', AdvisementSchema);

export { Advisement };
